import request from '@/sheep/request';

const ReservationRecordApi = {
  //创建预约记录
  create: (data) => {
    return request({
      url: '/system/reservation-record-app/create',
      method: 'POST',
      data
    });
  },
  //更新预约记录
  update: (data) => {
    return request({
      url: '/system/reservation-record-app/update',
      method: 'PUT',
      data
    });
  },

  //删除预约记录
  delete: (params) => {
    return request({
      url: `/system/reservation-record-app/delete`,
      method: 'DELETE',
      params
    });
  },

  //获得预约记录分页
  getPage: (data) => {
    return request({
      url: '/system/reservation-record-app/agent/page',
      method: 'GET',
      params: data
    });
  },

  //获得预约记录分页
  getAuditPage: (data) => {
    return request({
      url: '/system/reservation-record-app/audit/page',
      method: 'GET',
      params: data
    });
  },

  //获得预约记录分页
  getManufacturerPage: (data) => {
    return request({
      url: '/system/reservation-record-app/manufacturer/page',
      method: 'GET',
      params: data
    });
  },

  //审核预约记录
  audit: (data) => {
    return request({
      url: '/system/reservation-record-app/audit',
      method: 'PUT',
      data
    });
  },

  //获得预约记录详情
  getDetail: (params) => {
    return request({
      url: `/system/reservation-record-app/get`,
      method: 'GET',
      params
    });
  },

  //开始生产
  startProduce: (id) => {
    return request({
      url: `/system/reservation-record-app/${id}/start`,
      method: 'PUT'
    });
  },

  //生产完成
  completeProduce: (id) => {
    return request({
      url: `/system/reservation-record-app/${id}/finish`,
      method: 'PUT'
    });
  },

  // 提货完成
  pickUp: (id,data) => {
    return request({
      url: `/system/reservation-record-app/${id}/pick`,
      method: 'PUT',
      data
    });
  },

  //获得细胞产品分页
  getCellPage: (data) => {
    return request({
      url: '/system/reservation-record-app/product/page',
      method: 'GET',
      params: data
    });
  },

  //获得用户管理分页
  getUserManagePage: (data) => {
    return request({
      url: '/system/reservation-record-app/userManage/page',
      method: 'GET',
      params: data
    });
  },


};

export default ReservationRecordApi;
